console.log('hello world');

fn1();
function fn1(){
    const xhr = new XMLHttpRequest();

    xhr.open('POST','/users/login',true);

    xhr.onload = function(){
        console.log(JSON.parse(xhr.responseText));
    }


    xhr.setRequestHeader('Content-Type','application/json');
    xhr.send('{"name":"zhangsan","age":18}')
}